<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/28
 * Time: 10:58
 */
namespace App\Logic;

class Json{

    const login_error_code = 0;     //失败
    const login_success_code = 1;    //成功

    static public function success($message = null, $data = null, $code = 1)
    {
        return ['status' => 'success', 'code' => $code, 'message' => $message, 'data' => $data];
    }

    static public function error($message = null, $data = null, $code = 0)
    {
        return ['status' => 'error', 'code' => $code, 'message' => $message, 'data' => $data];
    }

}